from tkinter import *

root = Tk()
root.title("Текстовый редактор")
root.geometry('600x700')

f_text = Frame(root)
f_text.pack(fill=BOTH, expand=1)

text_fild = Text(f_text, bg="black", fg="lime", padx=10, pady=10,
                 wrap=WORD, insertbackground = 'brown', spacing3 = 10, width=30)
text_fild. pack(fill=BOTH, expand=1, side=LEFT)

scroll= Scrollbar(f_text, command=text_fild.yview)
scroll.pack(side=LEFT, fill=Y)
text_fild. config(yscrollcommand=scroll.set)

root.mainloop ( )
